/*
 * Copyright 2018 mytijian.com All right reserved. This software is the
 * confidential and proprietary information of mytijian.com ("Confidential
 * Information"). You shall not disclose such Confidential Information and shall
 * use it only in accordance with the terms of the license agreement you entered
 * into with mytijian.com.
 */
package com.mytijian.openapi.adapter.dianping.job;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.mytijian.openapi.adapter.dianping.service.DzopenShopAuthService;

/**
 * 类DzopenAuthUpdateJob.java的实现描述：TODO 类实现描述 
 * @author clozz Jan 29, 2018 3:46:04 PM
 */
@Component
public class DzopenAuthUpdateJob implements SimpleJob {

	private Logger logger = LoggerFactory.getLogger(DzopenAuthUpdateJob.class);
	
	@Autowired
	private DzopenShopAuthService dzopenShopAuthService;

	/* (non-Javadoc)
	 * @see com.dangdang.ddframe.job.api.simple.SimpleJob#execute(com.dangdang.ddframe.job.api.ShardingContext)
	 */
	@Override
	public void execute(ShardingContext shardingContext) {
		logger.info("【美团点评】 开始执行session刷新任务");
		try {
			dzopenShopAuthService.checkUpdate();
		} catch (Exception e) {
			logger.error("【美团点评】 session刷新任务执行失败",e);
		}
	}
}
